import { Direction } from "./characterConfig";
import type { CharacterPartConfig } from "./characterConfig";

// 服装库

export interface ClothingConfig {
  [Direction.Down]?: CharacterPartConfig;
  [Direction.Up]?: CharacterPartConfig;
  [Direction.Left]?: CharacterPartConfig;
  [Direction.Right]?: CharacterPartConfig;
}

/**
 * 帽子库
 */
export const Hats: Record<string, ClothingConfig> = {
  cowboyHat: {
    [Direction.Down]: {
      config: {
        sourceX: 29,
        sourceY: 843,
        width: 13,
        height: 14,
        offset: { x: 1, y: -4 },
        displayWidth: 13,
        displayHeight: 14,
      },
      name: "牛仔帽",
      description: "看起来很老的牛仔帽。",
    },
    [Direction.Up]: {
      config: {
        sourceX: 29,
        sourceY: 904,
        width: 13,
        height: 14,
        offset: { x: 1, y: -4 },
        displayWidth: 13,
        displayHeight: 14,
      },
      name: "牛仔帽",
      description: "看起来很老的牛仔帽。",
    },
    [Direction.Right]: {
      config: {
        sourceX: 29,
        sourceY: 863,
        width: 13,
        height: 14,
        offset: { x: 0, y: -5 },
        displayWidth: 13,
        displayHeight: 14,
      },
      name: "牛仔帽",
      description: "看起来很老的牛仔帽。",
    },
    [Direction.Left]: {
      config: {
        sourceX: 29,
        sourceY: 863,
        width: 13,
        height: 14,
        offset: { x: 0, y: -5 },
        displayWidth: 13,
        displayHeight: 14,
      },
      name: "牛仔帽",
      description: "看起来很老的牛仔帽。",
    },
  },
};

/**
 * 发型库
 */
export const Hairs: Record<string, ClothingConfig> = {
  Hairs1: {
    [Direction.Down]: {
      config: {
        sourceX: 1188,
        sourceY: 5,
        width: 14,
        height: 14,
        offset: { x: 0, y: -2 },
        displayWidth: 14,
        displayHeight: 14,
      },
      name: "发型1",
      description: "简单的短发造型",
    },
    [Direction.Right]: {
      config: {
        sourceX: 1188,
        sourceY: 37,
        width: 14,
        height: 14,
        offset: { x: -1, y: -4 },
        displayWidth: 14,
        displayHeight: 14,
      },
      name: "发型1",
      description: "简单的短发造型",
    },
    [Direction.Left]: {
      config: {
        sourceX: 1188,
        sourceY: 37,
        width: 14,
        height: 14,
        offset: { x: -1, y: -4 },
        displayWidth: 14,
        displayHeight: 14,
      },
      name: "发型1",
      description: "简单的短发造型",
    },
    [Direction.Up]: {
      config: {
        sourceX: 1188,
        sourceY: 69,
        width: 14,
        height: 14,
        offset: { x: 0, y: -3 },
        displayWidth: 14,
        displayHeight: 14,
      },
      name: "发型1",
      description: "简单的短发造型",
    },
  },
};

// 上衣库
export const Shirts = {};

// 裤子库
export const Pants = {};
